package com.ljx.itbbs.server.user.dao;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ljx.itbbs.server.user.domain.entity.PermsCategoryEntity;
import com.ljx.itbbs.server.user.domain.vo.req.PermsCategoryUpdateReq;
import com.ljx.itbbs.server.user.mapper.PermsCategoryMapper;
import org.springframework.stereotype.Service;

@Service
public class PermsCategoryDao extends ServiceImpl<PermsCategoryMapper, PermsCategoryEntity> {

    public void updatePermsCategory(PermsCategoryUpdateReq req) {
        lambdaUpdate().set(PermsCategoryEntity::getPermsName, req.getPermsName())
                .set(PermsCategoryEntity::getStatus, req.getStatus())
                .eq(PermsCategoryEntity::getId, req.getId())
                .update();
    }
}
